#include "mainbox.h"

#include <QApplication>
#include <QSharedMemory>
#include <QMessageBox>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MainBox w;
    QSharedMemory shard("run");
    if(shard.attach())
    {
        QMessageBox::warning(&w,"Error","程序重复运行");
        return 0;
    }
    shard.create(1);
    w.show();
    return a.exec();
}
